home *** CD-ROM | disk | FTP | other *** search
/ Aminet 45 / Aminet 45 (2001)(GTI - Schatztruhe)[!][Oct 2001].iso / Aminet / game / role / ldmud-3.2-bin.lha / mud / doc / efun / to_int < prev    next >
Text File  |  2001-04-06  |  680b  |  24 lines

  1. SYNOPSIS
  2.         int to_int(string)
  3.         int to_int(float)
  4.         int to_int(int)
  5.         int to_int(closure)
  6.  
  7.         (int)<value>
  8.  
  9. DESCRIPTION
  10.         Floats are truncated to integer values, strings with leadings
  11.         digits are converted to integers up to the first non-digit.
  12.         lfun-closures are converted into their function index.
  13.         Integers are just returned.
  14.  
  15.         Regarding floats, it is important to keep rounding effects
  16.         in mind: to_int(3.1*10.0) does not return 31, but instead 30,
  17.         because internally the result of the multiplication is 30.999999 .
  18.  
  19. HISTORY
  20.         Introduced in 3.2.1@2
  21.  
  22. SEE ALSO
  23.         to_string(E), sscanf(E)
  24.